package com.my.swas.common.exception;

/**
 * @Description:
 * @author: :MaYong
 */
public class ExceptionUtil {
    public static void checkState(boolean expression, String errorMessage) {
        if (!expression) {
            throw new ServiceException(errorMessage);
        }
    }
    public static void checkState(boolean expression, String field, String errorMessage) {
        if (!expression) {
            throw new DataFiledErrorException(field, errorMessage);
        }
    }
}
